#include "definition.h"
class Solution {
 public:
  ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) {
    if (!l1) return l2;
    if (!l2) return l1;

    ListNode* node;
    if (l1->val > l2->val) {
      node = l2;
      node->next = mergeTwoLists(l1, l2->next);
    } else {
      node = l1;
      node->next = mergeTwoLists(l1->next, l2);
    }
    return node;
  }
};
// 与2题类似